<?php
header('content-type:text/html; charset=utf-8');
@$id=$_REQUEST['id'];


$pdo=new PDO('mysql:dbname=ton;charset=utf8','root');
$s=$pdo->prepare('delete from user where id=:id');
$s->execute(array('id'=>$id));
$user=$s->fetch(PDO::FETCH_NAMED);
if($s->execute()){
	header('content-type:text/html; charset=utf-8');
	header('Refresh:2;url=/th2.php');
	print_r("<h3>删除成功</h3>");
}else{
	header('Refresh:2;url=/th2.php');
	print_r("<h3>删除失败</h3>");
}
?>